# Activities

Activities are Adafruit IO's list of actions you've taken to create, update, or
delete objects in your Adafruit IO account. We store the last 1000 actions taken for:

* Dashboards
* Blocks
* Feeds
* Groups
* Triggers

## All Activities

> HTTP Request
> <div class="http"><span class="method-get">GET</span> <code class="path">/api/v2/{username}/activities</code></div>

```shell
curl -H "X-AIO-Key: {io_key}" \
  https://io.adafruit.com/api/v2/{username}/activities
```

```python
```

```cpp
```

```ruby
```

> Response Sample

```json
[
  {
    "id": 0,
    "action": "string",
    "model": "string",
    "data": {
    },
    "user_id": 0,
    "created_at": "string",
    "updated_at": "string"
  }
]
```

### Path Parameters

Parameter |   Type  |  Required |       Description
--------- | ------- | --------- | -----------------------
username | string | true | a valid username string


### Query Parameters

Parameter |   Type  |  Required |       Description
--------- | ------- | --------- | -----------------------
start_time | string | false | Start time for filtering, returns records created after given time.
end_time | string | false | End time for filtering, returns records created before give time.
limit | integer | false | Limit the number of records returned.


## Get Activities by Type

> HTTP Request
> <div class="http"><span class="method-get">GET</span><code class="path">/api/v2/{username}/activities/{type}</code></div>

```shell
# Returns two records
$ curl -F 'limit=2' -H "X-AIO-Key: {io_key}" https://io.adafruit.com/api/v2/{username}/activities/{type}
```

```python
```

```cpp
```

```ruby
```

> Response Sample:

```json
[
  {
    "id": 0,
    "action": "string",
    "model": "string",
    "data": {
    },
    "user_id": 0,
    "created_at": "string",
    "updated_at": "string"
  }
]
```

An array of activities


### Path Parameters

Parameter |   Type  |  Required |       Description
--------- | ------- | --------- | -----------------------
username | string | true | a valid username string
type | string | true |


### Query Parameters

Parameter |   Type  |  Required |       Description
--------- | ------- | --------- | -----------------------
start_time | string | false | Start time for filtering, returns records created after given time.
end_time | string | false | End time for filtering, returns records created before give time.
limit | integer | false | Limit the number of records returned.


